Skip to content

Expose the PAGLayer::setAlpha() method as a public API for iOS and Android.#2783

Merged
domchen merged 4 commits intomainfrom
bugfix/ly_setAlpha
Apr 18, 2025
Merged

Expose the PAGLayer::setAlpha() method as a public API for iOS and Android.#2783
domchen merged 4 commits intomainfrom
bugfix/ly_setAlpha

Conversation

@leiyue123
Copy link
Collaborator

@leiyue123 leiyue123 commented Apr 17, 2025

将layer层cpp接口setAlpha、alpha暴露到ios和android

* Set the alpha of the layer, which will be concatenated to the current animation opacity for
* displaying.
*/
public native void setAlpha(float value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个属性读写要成对,把alpha读取属性也要暴露出来。

@leiyue123 leiyue123 changed the title add layer c++ interface setAlpha to ios and android add layer c++ interface setAlpha alpha to ios and android Apr 18, 2025
@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.40%. Comparing base (6c308db) to head (0e69737).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2783      +/-   ##
==========================================
- Coverage   77.41%   77.40%   -0.01%     
==========================================
  Files         419      419              
  Lines       22270    22270              
  Branches     6366     6290      -76     
==========================================
- Hits        17240    17238       -2     
  Misses       3775     3775              
- Partials     1255     1257       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

/**
* Returns the current alpha of the layer if previously set.
*/
public native float alpha();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按照项目习惯,get放法一般都写在set之前。调整一下顺序。

@leiyue123 leiyue123 changed the title add layer c++ interface setAlpha alpha to ios and android Expose the C++ interfaces setAlpha and alpha of the layer component to iOS and Android. Apr 18, 2025
@domchen domchen changed the title Expose the C++ interfaces setAlpha and alpha of the layer component to iOS and Android. Expose the PAGLayer::setAlpha() method as a public API for iOS and Android. Apr 18, 2025
Comment on lines +176 to +177
* Returns the current alpha of the layer if previously set.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释缩进不对,Java代码没法被工具自动格式化,自己要注意格式化问题。

@domchen domchen merged commit a2f9b8b into main Apr 18, 2025
8 checks passed
@domchen domchen deleted the bugfix/ly_setAlpha branch April 18, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants